package cn.iocoder.yudao.module.cmt.dal.mysql.activity;

import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.cmt.dal.dataobject.activity.ActivityInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.cmt.controller.admin.activity.vo.*;

@Mapper
public interface ActivityInfoMapper extends BaseMapperX<ActivityInfoDO> {

    default PageResult<ActivityInfoDO> selectPage(ActivityInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ActivityInfoDO>()
                .betweenIfPresent(ActivityInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ActivityInfoDO::getId));
    }

}
